<template>
  <div>
    <div>
      <h4>主表单加减乘除计算</h4>
      <el-row type="flex" justify="space-between">
        <el-col>
          <span>1.妄想：（错误的观念如：认为别人偷他/她的东西？怀疑有人害他？怀疑配偶不忠？怀疑要遗弃他？）</span>
          <div class="grid-content">
            <el-radio-group v-model="pgForm.calculate_radio1">
              <el-radio :label="3">有</el-radio>
              <el-radio :label="6">无</el-radio>
            </el-radio-group>
          </div>
        </el-col>
        <el-col :span="5">
          <div>
            <span>发生频率 </span>
            <el-select v-model="pgForm.calculate_value1" placeholder="请选择">
              <el-option
                v-for="item in options1"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </div>
        </el-col>
        <el-col :span="5">
          <div>
            <span>严重度 </span>
            <el-select v-model="pgForm.calculate_value2" placeholder="请选择">
              <el-option
                v-for="item in options2"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </div>
        </el-col>
        <el-col :span="5">
          <div>
            <span>得分 </span>
            <el-input v-model="pgForm.calculate_input1" placeholder="" readonly></el-input>
          </div>
        </el-col>
        <el-col :span="5">
          <div>
            <span>痛苦度 </span>
            <el-select v-model="pgForm.calculate_value3" placeholder="请选择">
              <el-option
                v-for="item in options3"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </div>
        </el-col>
        <el-col>
            <span>2.幻觉：（视幻觉或听幻觉？看到或听到不存在的东西或声音？和实际不存在的人说话？）</span>
            <div class="grid-content">
              <el-radio-group v-model="pgForm.calculate_radio2">
                <el-radio :label="3">有</el-radio>
                <el-radio :label="6">无</el-radio>
              </el-radio-group>
            </div>
        </el-col>
        <el-col :span="5">
          <div>
            <span>发生频率 </span>
            <el-select v-model="pgForm.calculate_value4" placeholder="请选择">
              <el-option
                v-for="item in options1"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </div>
        </el-col>
        <el-col :span="5">
          <div>
            <span>严重度 </span>
            <el-select v-model="pgForm.calculate_value5" placeholder="请选择">
              <el-option
                v-for="item in options2"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </div>
        </el-col>
        <el-col :span="5">
          <div>
            <span>得分 </span>
            <el-input v-model="pgForm.calculate_input2" placeholder="" readonly></el-input>
          </div>
        </el-col>
        <el-col :span="4">
          <div>
            <span>痛苦度 </span>
            <el-select v-model="pgForm.calculate_value6" placeholder="请选择">
              <el-option
                v-for="item in options3"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </div>
        </el-col>
        <el-col>
          <span>3.激越/攻击性：（拒接别人的帮助？难以驾驭？固执？向别人大戚大叫？大骂别人？）</span>
          <div class="grid-content">
            <el-radio-group v-model="pgForm.calculate_radio3">
              <el-radio :label="3">有</el-radio>
              <el-radio :label="6">无</el-radio>
            </el-radio-group>
          </div>
        </el-col>
        <el-col :span="5">
          <span>发生频率 </span>
          <div class="grid-content">
            <el-radio-group v-model="pgForm.calculate_radio4">
              <el-radio :label="1">1</el-radio>
              <el-radio :label="2">2</el-radio>
              <el-radio :label="3">3</el-radio>
              <el-radio :label="4">4</el-radio>
              <el-input v-model="pgForm.calculate_input3" placeholder="备注"></el-input>
            </el-radio-group>
          </div>
        </el-col>
        <el-col :span="4">
          <span>严重度 </span>
          <div class="grid-content">
            <el-radio-group v-model="pgForm.calculate_radio5">
              <el-radio :label="1">1</el-radio>
              <el-radio :label="2">2</el-radio>
              <el-radio :label="3">3</el-radio>
              <el-input v-model="pgForm.calculate_input4" placeholder="备注"></el-input>
            </el-radio-group>
          </div>
        </el-col>
        <el-col :span="5">
          <div>
            <span>得分 </span>
            <el-input v-model="pgForm.calculate_input5" placeholder="" readonly></el-input>
          </div>
        </el-col>
        <el-col :span="5">
          <span>痛苦度 </span>
          <div class="grid-content">
            <el-radio-group v-model="pgForm.calculate_radio6">
              <el-radio :label="0">0</el-radio>
              <el-radio :label="1">1</el-radio>
              <el-radio :label="2">2</el-radio>
              <el-radio :label="3">3</el-radio>
              <el-radio :label="4">4</el-radio>
              <el-radio :label="5">5</el-radio>
              <el-input v-model="pgForm.calculate_input6" placeholder="备注"></el-input>
            </el-radio-group>
          </div>
        </el-col>
        <el-col :span="11">
          <div>
            <span>数字输入框 </span>
            <el-input v-model="pgForm.calculate_input7" placeholder=""></el-input>
          </div>
        </el-col>
        <el-col :span="11">
          <div>
            <span>总分 </span>
            <el-input v-model="pgForm.calculate_input8" placeholder="" readonly></el-input>
          </div>
        </el-col>
      </el-row>
    </div>
  </div>
</template>

<script>
export default {
  name: "calculate",
  title: "主表单加减乘除计算",
  created() {
    if(this.istrans){
      this.pgForm=this.fromdata
    }
  },
  props: {
    fromdata:{},
    istrans:false,
  },
  data () {
    return {
      pgForm: {
          calculate_radio1: '',
          calculate_radio2: '',
          calculate_radio3: '',
          calculate_radio4: '',
          calculate_radio5: '',
          calculate_radio6: '',
          calculate_input1: '',
          calculate_input2: '',
          calculate_input3: '',
          calculate_input4: '',
          calculate_input5: '',
          calculate_input6: '',
          calculate_input7: '',
          calculate_input8: '',
          calculate_value1: '',
          calculate_value2: '',
          calculate_value3: '',
          calculate_value4: '',
          calculate_value5: '',
          calculate_value6: '',
      },

      options1: [{
        value: '1',
        label: '1'
      }, {
        value: '2',
        label: '2'
      }, {
        value: '3',
        label: '3'
      }, {
        value: '4',
        label: '4'
      }],
      options2: [{
        value: '1',
        label: '1'
      }, {
        value: '2',
        label: '2'
      }, {
        value: '3',
        label: '3'
      }],
      options3: [{
        value: '0',
        label: '0'
      }, {
        value: '1',
        label: '1'
      }, {
        value: '2',
        label: '2'
      }, {
        value: '3',
        label: '3'
      }, {
        value: '4',
        label: '4'
      }, {
        value: '5',
        label: '5'
      }],


    };
  }
}
</script>

<style scoped>

.el-select{
  width: 50%;
}
.el-input{
  width: 50%;
}
.el-row{
  margin: 10px 0;
  padding: 20px 20px;
  background-color: #f9f9f9;
  flex-wrap: wrap;
  flex-direction: row;
}
.el-col {
  margin:10px 0;
}
.el-radio-group{
  padding: 10px 20px;
}
.el-radio{
  display: block;
  margin-bottom: 15px;
}
</style>
